package packag06;
import Scope.Scope;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ScopeTest {
    @Test
    public void Test() {
        ApplicationContext context = new ClassPathXmlApplicationContext("scope.xml");
        Scope scope = context.getBean("scope", Scope.class);
        scope.Scope();

        Scope scope1 = context.getBean("scope", Scope.class);
        scope1.Scope();

        ((AbstractApplicationContext) context).close();

    }
}
